package com.shuan.springboothello;

import de.codecentric.boot.admin.server.config.EnableAdminServer;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.scheduling.annotation.EnableScheduling;

import java.util.Collections;

@SpringBootApplication  // 标记SpringBoot的启动类
@EnableScheduling
@EnableAdminServer
public class SpringBootHelloApplication {

	public static void main(String[] args) {
		// 启动方式一
//		SpringApplication.run(SpringBootHelloApplication.class, args);
		// 启动方式二，注入端口属性
		SpringApplication app = new SpringApplication(SpringBootHelloApplication.class);
		app.setDefaultProperties(Collections
				.singletonMap("server.port", "8887"));
		app.run(args);
	}

}
